<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/12/8 0008
 * Time: 下午 10:22
 */

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * HelloWorld Model
 *
 * @since  0.0.1
 * allModeEvery
 */
class ZsfieldModelZsfield1 extends JModelItem
{
    /**
     * @var string message
     */
    protected $message;

    /**
     * Get the message
     *
     * @return  string  The message to be displayed to the user
     */
    public function getMsg()
    {
        if (!isset($this->message)) {
            $jinput = JFactory::getApplication()->input;
            //  $id     = $jinput->get('id', 1, 'INT');
            $id = $jinput->get('id');
            switch ($id) {
                case 2:
                    $this->message = 'Good bye World!';
                    break;
                case 1:
                    $this->message = 'Hello World!';
                break;
                default:
                    $this->message = 'jinput nonthing!';
            }
        }

        return $this->message;
    }
}